// 主界面
;
define(function(require, exports, module) {
	'use strict';
	var util = require("util");
	var base = require("base");
	var dialog = require("dialog");
	var validate = require("validate");
	var css_param = require("./createPickup6.css");
	var tools = require("tools");
	var databind = require("databind");
	var constant = require("constant");
    var html_bulkstockInfo = require("./html_bulkstockInfo.html");//查询货物弹出框内容
    var html_commonlyInfo = require("./html_commonlyInfo.html");
    var router = require("../hash/pageRouter");
	var html_verify = require("../apply/apply_verify.html");
	var html_bailReturn = require("./html_bailReturn.html");
	var html_cancelApplication = require("./html_cancelApplication.html");
    var ds;
	var productTypes;
    var enterpriseId;
    var financeNumber;
    var enterpriseName;
    var financeId;
    var financeState;
	var productType;
	var financeAmount;
    var pageIndex = 1,
		pageSize = 10,
		totalPageCount = 1,
		totalRecordCount = 0; //分页初始化
	var init = function(page) {
		enterpriseId = page.params.enterpriseId;
		financeNumber = page.params.financeNumber;
		enterpriseName = page.params.enterpriseName;
		productTypes = page.params.productType;
		financeId = page.params.financeId;
		$(".d2 a").removeClass("active_tab");
		$(".warehousePickups").addClass("active_tab");
		$(".accountDetail").parent().parent().addClass("active_tab4");
		$(".accountDetail").parent().parent().removeClass("active_tab1");
		$(".accountDetail").parent().parent().removeClass("active_tab2");
		$(".accountDetail").parent().parent().removeClass("active_tab3");
		inquireFinanceApplicationDetail_s2();
		router.init();
		initEvent();
	};
	var initEvent = function() {
		$("#createPickup6 input[name=buyer]").val(enterpriseName);
		$("#createPickup6 input[name=productType]").val(productTypes);
		//发票类型点击事件
		$("#createPickup6 input[name=invoiceType]").unbind("click").click(function(){
			if ($(this).val() == "0") {
				$("#createPickup6 .invoiceInfo1").html("");
			} else if ($(this).val() == "1"){
				var str = '<div class="dataLine">				<div class="requireInput">					公司名称:<input type="text" isNull="1" codeName="公司名称" name="invoiceEnterpriseName" placeholder="请输入公司名称"/>				</div>				<div>				</div>			</div>			<div class="dataLine">				<div class="requireInput">					纳税识别号:<input type="text" isNull="1" codeName="纳税识别号" name="invoiceTaxpayerNumber" placeholder="请输入纳税识别号"/>				</div>				<div>				</div>			</div>			<div class="dataLine">				<div class="requireInput">					地址、电话:<input type="text" isNull="1" codeName="地址、电话" name="invoiceAddress" placeholder="请输入地址、电话"/>				</div>				<div>				</div>			</div>			<div class="dataLine">				<div class="requireInput">					开户行及账号:<input type="text" isNull="1" codeName="开户行及账号" name="invoiceAccount" placeholder="请输入开户行及账号"/>				</div>				<div>				</div>			</div>';
				$("#createPickup6 .invoiceInfo1").html(str);
			} else if ($(this).val() == "2") {
				var str = '<div class="dataLine">				<div class="requireInput">					公司名称:<input type="text" isNull="1" codeName="公司名称" name="invoiceEnterpriseName" placeholder="请输入公司名称"/>				</div>				<div>				</div>			</div>			<div class="dataLine">				<div class="requireInput">					纳税识别号:<input type="text" isNull="1" codeName="纳税识别号" name="invoiceTaxpayerNumber" placeholder="请输入纳税识别号"/>				</div>				<div>				</div>			</div>';
				$("#createPickup6 .invoiceInfo1").html(str);
			}
			
		});
		
		$("#createPickup6").on("click", ".delete2", function() {
			
			$(this).parents("tr").remove();
			
			if ($("#createPickup6 .table tr").length > 1) {
				$("#createPickup6 select[name=enterpriseId]").attr("disabled", "disabled");
			} else {
				$("#createPickup6 select[name=enterpriseId]").removeAttr("disabled");
			}
		});
		
		$("#createPickup6").on("change", "input[name=others]", function(){
			var $this = $(this);
			if (!isNaN($this.parents("tr").find("input[name=bulkstockAmounts]").val()) && !isNaN($this.parents("tr").find("input[name=interests]").html()) && !isNaN($this.parents("tr").find("input[name=others]").html())) {
				$this.parents("tr").find(".pickupAmount").html($this.parents("tr").find("input[name=interests]").val()*1 + $this.parents("tr").find("input[name=others]").val()*1 + $this.parents("tr").find("input[name=bulkstockAmounts]").val()*1);
				$this.parents("tr").find("input[name=pickupAmounts]").val($this.parents("tr").find("input[name=interests]").val()*1 + $this.parents("tr").find("input[name=others]").val()*1 + $this.parents("tr").find("input[name=bulkstockAmounts]").val()*1);
			}
		});
		
		$("#createPickup6").on("change", "input[name=interests]", function(){
			var $this = $(this);
			if (!isNaN($this.parents("tr").find("input[name=bulkstockAmounts]").val()) && !isNaN($this.parents("tr").find("input[name=interests]").html()) && !isNaN($this.parents("tr").find("input[name=others]").html())) {
				$this.parents("tr").find(".pickupAmount").html($this.parents("tr").find("input[name=interests]").val()*1 + $this.parents("tr").find("input[name=others]").val()*1 + $this.parents("tr").find("input[name=bulkstockAmounts]").val()*1);
				$this.parents("tr").find("input[name=pickupAmounts]").val($this.parents("tr").find("input[name=interests]").val()*1 + $this.parents("tr").find("input[name=others]").val()*1 + $this.parents("tr").find("input[name=bulkstockAmounts]").val()*1);
			}
		});
		
		$("#createPickup6").on("change", "input[name=bulkstockAmounts]", function(){
			var $this = $(this);
			if (!isNaN($this.parents("tr").find("input[name=bulkstockAmounts]").val()) && !isNaN($this.parents("tr").find("input[name=interests]").html()) && !isNaN($this.parents("tr").find("input[name=others]").html())) {
				$this.parents("tr").find(".pickupAmount").html($this.parents("tr").find("input[name=interests]").val()*1 + $this.parents("tr").find("input[name=others]").val()*1 + $this.parents("tr").find("input[name=bulkstockAmounts]").val()*1);
				$this.parents("tr").find("input[name=pickupAmounts]").val($this.parents("tr").find("input[name=interests]").val()*1 + $this.parents("tr").find("input[name=others]").val()*1 + $this.parents("tr").find("input[name=bulkstockAmounts]").val()*1);
			}
		});
		
		$("#createPickup6 .commonlyInfo").unbind("click").click(function(){
			var ii = layer.open({
			  title: '常用信息',
			  type: 1,
			  skin: 'layui-layer-rim', //加上边框
			  area: ['1000px', '650px'], //宽高
			  content: html_commonlyInfo,
			  btn: ['确定', '取消'],
			  yes: function(){
				  databind.fillForm($("#createPickup6 .invoiceInfo"), ds[$(".html_commonlyInfo input[name=selected]:checked").parents("tr").attr("index")]);
				$("#createPickup6 input[name=buyer]").val(enterpriseName);
				layer.close(ii);
			  }
			});
			
			var oData = {
				pageIndex: pageIndex,
				pageSize: pageSize,
				totalPageCount: 0
			};
			
			$(".html_commonlyInfo .search").unbind("click").click(function(){
				oData = {
					pageIndex: pageIndex,
					pageSize: pageSize,
					totalPageCount: 0,
					invoiceEnterpriseName: $(".html_commonlyInfo input[name]").val()
				};
				tools.loadList("inquireEnterpriseInvoiceInfoPageList.json", $(".html_commonlyInfo .dataBody"), $(".html_commonlyInfo .dataTpl"), oData, function(data){
					ds = data.datas;
				}, $(".html_commonlyInfo .pagerCon"));
			});
			
			tools.loadList("inquireEnterpriseInvoiceInfoPageList.json", $(".html_commonlyInfo .dataBody"), $(".html_commonlyInfo .dataTpl"), oData, function(data){
				ds = data.datas;
			}, $(".html_commonlyInfo .pagerCon"));
		});
		
//		tools.loadSelectList($("#createPickup6 select[name=enterpriseId]"), "inquireEnterpriseList.json", "id", "name", null);
		
		$("#createPickup6 .addBulkstockInfo").unbind("click").click(function(){
			var ii = layer.open({
			  title: '添加货物信息',
			  type: 1,
			  skin: 'layui-layer-rim', //加上边框
			  area: ['1000px', '600px'], //宽高
			  content: html_bulkstockInfo,
			  btn: ['确定', '取消'],
			  yes: function(){
			  	if ($(".html_bulkstockInfo .check:checked").length > 0) {
				  	var i = 1;
				  	$.each($(".html_bulkstockInfo .check:checked"), function() {
				  		var $this = $(this);
				  		var tr = $(this).parents("tr").clone();
				  		tr.find(".check").parent().remove();
				  		tr.find(".index").html(i);
				  		tr.find("input[name=pickupQuantitys]").parent().append(tr.find("input[name=pickupQuantitys]").val());
//				  		tr.append("<td><a href='javascript:void(0);' name='delete2' class='delete2'>删除</a></td>");
				  		
				  		tr.find(".pickupAmount").parent().append("<input type='hidden' name='pickupAmounts'/>");
				  		
				  		tr.find("input[name=pickupQuantitys]").parent().append(tr.find("input[name=pickupQuantitys]").val());
//				  		
//				  		tr.find("input[name=bulkstockAmounts]").parent().append(tr.find("input[name=bulkstockAmounts]").val());
				  		
//				  		tr.find("input[name=interests]").parent().append(tr.find("input[name=interests]").val());
					
				  		$("#createPickup6 .table").append(tr);
				  		i++;
				  	});
				  	layer.close(ii);
			  	} else {
					base.alert(2, "请选择货物！");
				}
			  	
			  	tools.clearNoNumAll($("#createPickup6"));
			  	if ($("#createPickup6 .table tr").length > 1) {
					$("#createPickup6 select[name=enterpriseId]").attr("disabled", "disabled");
				} else {
					$("#createPickup6 select[name=enterpriseId]").removeAttr("disabled");
				}
			  }
			});
			
			tools.loadSelectList($(".html_bulkstockInfo select[name=bulkstockInfoId]"), "inquireBulkstockPageList.json?pageSize=1000", "bulkstockInfoId", "bulkstockName", "specificationName");
			tools.loadSelectList($(".html_bulkstockInfo select[name=warehouseName]"), "inquireWarehouseList.json?enterpriseId=" + enterpriseId, "text", "text", null);
			$(".html_bulkstockInfo span[name=enterpriseName]").html(enterpriseName);
			$(".html_bulkstockInfo input[name=enterpriseId]").val(enterpriseId);
			$(".html_bulkstockInfo select[name=productType]").val(productTypes);
			$(".html_bulkstockInfo input[name=financeNumber]").val(financeNumber);

			
			$(".html_bulkstockInfo .search").unbind("click").click(function(){
				databind.submitDom($(".html_bulkstockInfo"), function(data){
					juicer.register("getValueByKey", constant.getValueByKey);
					var tpl = $(".html_bulkstockInfo .dataTpl").html();
					var html = juicer(tpl, data);
					$(".html_bulkstockInfo .dataBody").html(html);
					
					$.each($(".html_bulkstockInfo .check"), function() {
						var $this1 = $(this).parents("tr");
						$.each($("#createPickup6 table tr"), function(){
							var $this2 = $(this);
							if (($this1.find("input[name=locationIds]").val() != null && $this2.find("input[name=locationIds]").val() != null) && $this1.find("input[name=locationIds]").val() == $this2.find("input[name=locationIds]").val()) {
								if (($this1.find("input[name=financeIds]").val() != null && $this2.find("input[name=financeIds]").val() != null) && $this1.find("input[name=financeIds]").val() == $this2.find("input[name=financeIds]").val()) {
									$this1.find("input").attr("disabled", "disabled");
								}
							}
						});
					});
				});
			});
			
		});
		
		tools.fileupload($("#createPickup6 #createPickup6FilesUuid"), null, function(data){
			var str = '<span class="showFiles"><a target="_blank" class="mas" fileUuid="' + data.result.data[0].fileUuid + '" href="/finance/api/v1.0/downloadFile.file?fileUuid=' + data.result.data[0].fileUuid + '" class="showProductIntro">' + data.result.data[0].fileName + '</a>&nbsp;&nbsp;&nbsp;&nbsp;<a class="removeFile">x</a></span>';
			$("#createPickup6 .addfile").before(str);
			var fs = [];
			$.each($('#createPickup6 .mas'), function() {
				fs.push($(this).attr("fileUuid"));
			});
			$("#createPickup6 input[name=filesUuid]").val(fs);
		});
		
		$("#createPickup6").on("click", ".removeFile", function(){
			$(this).parents(".showFiles").remove();
			var fs = [];
			$.each($('#createPickup6 .mas'), function() {
				fs.push($(this).attr("fileUuid"));
			});
			$("#createPickup6 input[name=filesUuid]").val(fs);
		});
		
		//提交
		$("#createPickup6 .sure").unbind("click").click(function(){
			$("#createPickup6 input[name=enterpriseId]").val(enterpriseId);
			if ($("#createPickup6 table tr").length > 1) {
				databind.submitDom($("#createPickup6"), function(){
					base.alert(1, "提交成功!");
					router.route("account/warehousePickupList2.html?financeId=" + financeId);
				});
			} else {
				base.alert(2, "请先添加提货货物！");
			}
		});
		
		//取消
//		$("#createPickup6 .cancel_s2").unbind("click").click(function(){
//			router.route("account/warehousePickupList2.html");
//		});
		
		//融资证明材料
		$(".accountMaterial").unbind("click").click(function() {
			router.route("account/accountDetailMaterial.html?financeId=" + financeId + "&type="+productTypes);
		});

		//融资动态
		$(".accountProcess").unbind("click").click(function() {
			router.route("account/accountDetailProcess.html?financeId=" + financeId + "&type="+productTypes);
		});

		//提货列表
		$(".warehousePickups").unbind("click").click(function() {
			router.route("account/warehousePickupList2.html?financeId=" + financeId + "&type="+productTypes);
		});
		//融资项目信息
		$(".accountDetail").unbind("click").click(function(){
			router.route("account/accountDetail.html?financeId="+financeId + "&type="+productTypes);
		});

	};
	 //提交融资申请
	var submitFinanceApplication = function() {
		base.fnAjax({
			action: "submitFinanceApplication.json",
			async: false,
			oData: {
				financeId: financeId
			}, //传递参数
			fnSuccess: function(data) {
				if (data.status == 200) {
					router.route("account/accountMain.html");
				} else {
					base.alert(2, data.message);
				}
			}
		});
	};
	
	//取消融资申请
	var cancelFinanceApplication = function() {
		base.fnAjax({
			action: "cancelFinanceApplication.json",
			async: false,
			oData: {
				financeId: financeId
			}, //传递参数
			fnSuccess: function(data) {
				if (data.status == 200) {
					base.alert(1, "操作成功！");
					dialog.hideDialog($("#applyVerify"));
					router.route("account/accountMain.html");
				} else {
					base.alert(3, data.message);
				}
			}
		});
	};
	
	//货物一览
	var bulkstockListing = function() {
		router.route("account/accountBulkstockListing.html?financeId=" + financeId);
	}
	//融资评价
	var evaluteFinanceApplication = function() {
		router.route("account/accountEvaluate.html?financeId=" + financeId);
	}
	//合同一览
	var documentSign = function() {
		router.route("account/documentSign.html?financeId=" + financeId+"&financeState="+financeState);
	}
	var showEvaluteDetail = function(){
		router.route("account/accountEvaluateDetail.html?financeId="+financeId);
	}
	//额度处理
	var verifyFinanceApplication = function() {
		$("#popdialog").html(html_verify);
		dialog.showDialog($("#applyVerify"));
		$(".financeNumber").html(financeNumber);
		$(".financeAmount").html("￥" + financeAmount);

		databind.fillInput($("#applyVerify"), {
			action: "inquireCurrentEnterpriseDetail.json",
			version: "v1.0"
		});
		$("#verifySure").unbind("click").click(function() {
			consentFinanceAuditAmountApplication();
		});

		$("#verifyCancel").unbind("click").click(function() {
			cancelFinanceApplication();
		});
	}

	//接受融资审批金额
	var consentFinanceAuditAmountApplication = function() {
		base.fnAjax({
			action: "consentFinanceAuditAmountApplication.json",
			async: false,
			oData: {
				financeId: financeId
			},
			fnSuccess: function(data) {
				tools.cancelProtectDoubleClick();
				if (data.status == 200) {
					base.alert(1, "操作成功！");
					dialog.hideDialog($("#applyVerify"));
					router.route("account/accountMain.html");
				} else {
					base.alert(2, "数据获取失败");
				}
			}
		});
	};
	
	//查询评价信息
	var inquireFinanceEvaluate = function() {
		base.fnAjax({
			action: "inquireFinanceEvaluate.json",
			async: false,
			oData: {
				financeId: financeId
			}, //传递参数
			fnSuccess: function(data) {
				if (data.status == 200) {
					if (data.datas[0].content == "") {
						$(".buttonOperate").html("评价").attr("id", "evalute");
					} else {
						$(".buttonOperate").remove();
					}
				} else {
					$(".buttonOperate").html("评价").attr("id", "evalute");
					//                  base.alert(2,"信息获取失败");
				}
			}
		});
	};
	//提货申请
	var pickupFinanceApplication = function() {
		router.route("account/accountPickup.html?financeId=" + financeId + "&financeNumber=" + financeNumber);
	}
	//修改融资申请
	var updateFinanceApplication = function() {
		location.href = "../apply/apply_main.html?financeId=" + financeId + "&productType=" + productType;
	}
	//查询融资信息详情
	var inquireFinanceApplicationDetail_s2 = function() {
		base.fnAjax({
			action: "inquireFinanceApplicationDetail.json",//inquireFinanceApplicationList
			async: false,
			oData: {
				financeId: financeId
			}, //传递参数
			fnSuccess: function(data) {
				if (data.status == 200) {
					financeState = data.datas[0].financeState;
					enterpriseId=data.datas[0].enterpriseId;
					enterpriseName=data.datas[0].enterpriseName;
					productType=data.datas[0].productType;
					financeNumber=data.datas[0].financeNumber;
					financeAmount=data.datas[0].financeAmount;
//					if(productType == 2){
//						if (financeState == 1) {
//							
//						} else if (financeState == 2) {
//							$(".buttonOperate6").html("额度处理").attr("id", "verifyApply6").removeClass("none");
//							$(".buttonOperate6:first").before('<a class="buttonOperate6" id="cancelApply6">取消申请</a>');
//						} else if (financeState == 4) {
//							$(".buttonOperate6").html("修改").attr("id", "modifyApply6").removeClass("none");
//							$(".buttonOperate6:first").before('<a class="buttonOperate6" id="cancelApply6">取消申请</a>');
//						} else if (financeState == 17) {
//							inquireFinanceEvaluate();
//						} else if (financeState == 18) {
//							$(".buttonOperate6").html("评价").attr("id", "evalute6").removeClass("none");
//						} else if (financeState == 19) {
//							$(".buttonOperate6").html("评价信息").attr("id", "evaluteDetail6").removeClass("none");
//						} else if (financeState == 20) {
//							$(".buttonOperate6").html("取消申请").attr("id", "cancelApply6").removeClass("none");
//							$(".buttonOperate6:first").before('<a class="buttonOperate6" id="modifyApply6">修改</a>');
//							$(".buttonOperate6:first").before('<a class="buttonOperate6" id="submitApply6">提交融资</a>');
//						} else {
//							$(".buttonOperate6").hide();
//						}
//						
//						if (data.datas[0].bail - data.datas[0].bailAlreadyReturn > 0) {
//							$(".buttonOperate6:first").before('<a class="buttonOperate6" id="bailReturn6">退还保证金</a>');
//						}
//						if (financeState > 5) {
//							$(".buttonOperate6:first").before('<a class="buttonOperate6" id="bulkstockListing6">货物一览</a>');
//						}
//						if (financeState == 24 || financeState == 23 || financeState == 22) {
//							$(".buttonOperate6:first").before('<a class="buttonOperate6" id="documentSign6">合同签署</a>');
//						}
//	
//						if (financeState >= 6) {
//							$(".exceptionOperate").removeClass("none");
//							$(".buttonOperate6:first").before('<a class="buttonOperate6" id="pickupApply6">申请提货</a>');
//						}
//					}else 
					if(productType == 6){
//						if (data.datas[0].bail - data.datas[0].bailAlreadyReturn > 0) {
//							$(".buttonOperate6:first").before('<a class="buttonOperate6" id="bailReturn6">退还保证金</a>');
//						}
//						if (financeState > 5) {
//							$(".buttonOperate6:first").before('<a class="buttonOperate6" id="bulkstockListing6">货物一览</a>');
//						}
//						if (financeState == 24 || financeState == 23 || financeState == 22) {
//							$(".buttonOperate6:first").before('<a class="buttonOperate6" id="documentSign6">合同签署</a>');
//						}
	
						$(".buttonOperate6:first").before('<a class="buttonOperate6" id="createPickups6">提货</a>');
					}else if(productType == 5){
//						if (financeState > 5) {
//							$(".buttonOperate6:first").before('<a class="buttonOperate6" id="bulkstockListing6">货物一览</a>');
//						}
//						if (financeState == 24 || financeState == 23 || financeState == 22) {
//							$(".buttonOperate6:first").before('<a class="buttonOperate6" id="documentSign6">合同签署</a>');
//						}
	
						$(".buttonOperate6:first").before('<a class="buttonOperate6" id="createPickups6">提货</a>');
					}
					
//					$(".buttonOperate6:first").before('<a class="buttonOperate6" id="calcelApply6">融资申请取消</a>');
					
					databind.disableInput(".content2");
					$("#calcelApply6").unbind("click").click(function(){
						var ii = layer.open({
						  title: '融资取消申请',
						  type: 1,
						  skin: 'layui-layer-rim', //加上边框
						  area: ['800px', '300px'], //宽高
						  content: html_cancelApplication,
						  btn: ['确定', '取消'],
						  yes: function(){
						  	databind.submitDom($(".createFinanceCancelApplication"), function(){
						  		layer.msg("申请成功！");
						  		layer.close(ii);
						  		router.route("account/accountDetail.html?financeId=" + financeId);
						  	});
						  }
						});
						
						$(".createFinanceCancelApplication input[name=financeId]").val(financeId);
					});
					//取消融资
					$("#cancelApply6").unbind("click").click(function() {
						dialog.showConfirmDialog("取消融资", "是否确定取消融资？", function(){
							cancelFinanceApplication();
						});
					});
					//提交融资
					$("#submitApply6").unbind("click").click(function() {
						dialog.showConfirmDialog("提交融资", "提交以后不能再次修改,是否确定提交融资？", function(){
							submitFinanceApplication();
						});
					});
					
					$("#verifyApply6").unbind("click").click(function() {
						verifyFinanceApplication();
					});
					
					//修改融资
					$("#modifyApply6").unbind("click").click(function() {
						updateFinanceApplication();
					});
					//评价
					$("#evalute6").unbind("click").click(function() {
						evaluteFinanceApplication();
					});
					//货物一览
					$("#bulkstockListing6").unbind("click").click(function() {
						bulkstockListing();
					});
					//合同一览
					$("#documentSign6").unbind("click").click(function() {
						documentSign();
					});
					//保证金退还
					$("#bailReturn6").unbind("click").click(function() {
						var ii = layer.open({
						  title: '保证金退还',
						  type: 1,
						  skin: 'layui-layer-rim', //加上边框
						  area: ['300px', '150px'], //宽高
						  content: html_bailReturn,
						  btn: ['确定', '取消'],
						  yes: function(){
						  	databind.submitDom($(".createBailReturn"), function(){
						  		layer.msg("申请成功！");
						  		layer.close(ii);
						  	});
						  }
						});
						$(".createBailReturn input[name=financeId]").val(financeId);
						tools.clearNoNumAll($(".createBailReturn"));
					});
					//提货
					$("#createPickups6").unbind("click").click(function(){
						if(productType == 5){
							router.route("account/createPickup6.html?enterpriseId=" + enterpriseId +"&financeNumber=" + financeNumber+"&enterpriseName="+enterpriseName+"&productType="+productType+"&financeId="+financeId);
						}else if(productType == 6){
							router.route("account/createPickup4.html?enterpriseId=" + enterpriseId +"&financeNumber=" + financeNumber+"&enterpriseName="+enterpriseName+"&productType="+productType+"&financeId="+financeId);
						}
						
					});
					//查看评价信息
					$("#evaluteDetail6").unbind("click").click(function() {
						showEvaluteDetail();
					});
					//提货申请
					$("#pickupApply6").unbind("click").click(function() {
						pickupFinanceApplication();
					});
				} else {}
			}
		});
	};
	return {
		init: init
	};
});